home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 3 / United Public Domain Gold 3.iso / c / fakemouse.doc < prev    next >
Text File  |  1994-03-30  |  3KB  |  56 lines

  1. FakeMouse.doc
  2.  
  3. This is a fairly quick program with a limited audience (hence the simple
  4. documentation). This is only the first release, there are a number of
  5. parameters that are hard-coded into the program that I want to make
  6. configurable from outside, but I thought I'd get some comments in first.
  7. Parameters I'm intending to do this with are marked (X)
  8.  
  9. WHAT IT IS.
  10. FakeMouse is a program written for OS V40 (CD32 - although it runs on kicked
  11. A4000s). It also requires >=68020. Once run, it sits in the background and
  12. monitors the controller plugged into port A (X). Depending on what you do,
  13. it generates mouse events that allow the Intuition pointer to do all the
  14. things it would do if a mouse was plugged in. Typically, the program would
  15. be fired up at boot time and left running. It doesn't take up much space,
  16. and shouldn't use much CPU time (although I haven't gone nutty shaving off
  17. microseconds).
  18.  
  19. WHO IT'S FOR.
  20. Any CD32 developers who are producing CD's that may require the use of a
  21. mouse or use a mouse-type interface. Particularly those compiling PD or
  22. compilation CD's written before the CD32/Joypad days. This program can
  23. be freely used however you see fit.
  24.  
  25. HOW IT WORKS.
  26. Every 25 mS (X), FakeMouse scans port A (X). It is looking for a Joystick or
  27. a Joypad. A mouse isn't supported, because if you had one it would be in
  28. port B, and you wouldn't need to fake anything! Any of Up/Down/Left/Right
  29. generate faked events that cause the mouse pointer to move in the
  30. appropriate direction at an accelerating rate decided by the program (X).
  31. The Joypad Red button generates Left Mouse Button events, and the Blue
  32. button generates Right Mouse Button events.
  33.  
  34. For joystick users, the situation is complicated slightly by only having one
  35. button. What I have done here is generate Left Mouse button events for the
  36. trigger, but if you hold the trigger down for >1 second (X), the Left button 
  37. is released, and a Right mouse button event is generated instead. Note that
  38. for joystick users, you can't simulate both buttons held down simultaneously.
  39.  
  40. The program copes with swapping controller types.
  41.  
  42. Running the program for a second time removes the one running in the
  43. background.
  44.  
  45. PROBLEMS.
  46. FakeMouse seems to do its job reasonably well. It may look a little jerky.
  47. I have set a poll time of 25mS, which looks OK, and keeps the processor
  48. overhead down. Poll times of 10mS look very smooth, but obviously use more
  49. CPU. When this is configurable from outside, you can pick values that look
  50. good or suit your CPU budget.
  51.  
  52. COMMENTS.
  53. Let me know of any changes or improvements you want.
  54. INTERNET: sgoddy@cix.compulink.co.uk
  55. CIS     : 100014,674
  56.